from django.urls import path
from .views import (
    DepartmentListCreateView,
    PositionListCreateView,
    StaffView,
    AddWorkflowListView,
    AddWorkflowRoleView,
    ListWorkflowView,
    WorkflowApprovalNodeCreateView,
    WorkflowApprovalNodeListView,
    TaskCreateView,
    NextReviewerView,
)

urlpatterns = [
    # 添加部门接口
    path('department/', DepartmentListCreateView.as_view()),
    # 添加职位接口
    path('position/', PositionListCreateView.as_view()),
    # 增加工作流接口
    path('add_workflow/', AddWorkflowListView.as_view()),
    # 增加工作流角色接口
    path('add_workflowRole/', AddWorkflowRoleView.as_view()),

    # 用户接口
    path('staff/', StaffView.as_view()),
    # 用户接口
    path('staff/<int:pk>/', StaffView.as_view()),

    # 显示用户工作流列表
    path('list_workflow/', ListWorkflowView.as_view()),
    # 工作流配制审批流程
    path('create_workflowApprovalNode/', WorkflowApprovalNodeCreateView.as_view()),
    # 工作流审批流程列表
    path('list_workflowApprovalNode/', WorkflowApprovalNodeListView.as_view()),

    # 调用Agent创建任务表
    path('create_task/', TaskCreateView.as_view()),
    # 调用Agent获取下一审批人
    path('next_reviewer/', NextReviewerView.as_view()),
]
# http://localhost:8000/workflow/+上面的urls